Port WorkIQ MCP integration to C# (.NET agent-framework weather sample)#651
Port WorkIQ MCP integration to C# (.NET agent-framework weather sample)#651vinchencc wants to merge 1 commit into
Conversation
|
@vinchencc please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
Note on validationThis C# port is a code-parity migration of the Python WorkIQ integration in #645. The routing logic (US-weather → local weather tools; everything else → WorkIQ MCP The Python PR (#645) is runtime-validated in the M365 Agents Playground (real tenant data returned via |
Summary
Ports the WorkIQ (Agent 365) MCP integration from the Python
agent-frameworkweather sample to the C# / .NETAgent Frameworkweather sample. Functionally mirrors the Python version and follows the officialmicrosoft/Agent365-Samples.NET pattern.What it does
The agent now routes requests based on intent:
GetCurrentWeatherForLocation,GetWeatherForecastForLocation,getDate)Changes
Agent/WeatherAgent.cs— injectIMcpToolRegistrationService; routing instructions; asyncGetClientAgentthat acquires a token (bearer for dev / OBO for prod) and merges WorkIQ MCP tools onto the local weather tools viaGetMcpToolsAsync; graceful fallback (SKIP_TOOLING_ON_ERRORS); updated welcome message.Program.cs— registerIMcpToolRegistrationService+IMcpToolServerConfigurationServicein DI.AgentFrameworkWeather.csproj— addMicrosoft.Agents.A365.Tooling+Microsoft.Agents.A365.Tooling.Extensions.AgentFramework.appsettings.json— addAgentApplicationauth handler config keys.Auth modes
BEARER_TOKENenv var (froma365 develop get-token).Testing
dotnet buildsucceeds (0 warnings, 0 errors).Notes